package com.znf4.timer;
/*package com.znf4.platform.timer;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.znf4.platform.banklink.utils.longyang.ConstantUtils;
import com.znf4.platform.banklink.utils.longyang.LongYangD0Util;
import com.znf4.platform.common.core.enums.PublicStatusEnum;
import com.znf4.platform.common.core.page.PageParam;
import com.znf4.platform.user.entity.RpUserSecondLevelMerchant;
import com.znf4.platform.user.mapper.RpUserSecondLevelMerchantDao;
import com.znf4.platform.user.service.RpUserSecondLevelMerchantService;

*//**
 * 龙飏二级商户报备定时器
 *//*
public class UpdateSecondMerchantTimer {
	private static final Logger LOG = LoggerFactory.getLogger(UpdateSecondMerchantTimer.class);
	
	@Autowired
	private RpUserSecondLevelMerchantDao rpUserSecondLevelMerchantDao;
	
	@Autowired
	private RpUserSecondLevelMerchantService rpUserSecondLevelMerchantService;
	
	// 执行方法  
    public void run() {
    	LOG.info("进入龙飏修改二级商户定时器任务！");
    	String message = "本批二级商户修改成功！！";
    	
		Map<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("status", "ACTIVE");
		PageParam pageParam = new PageParam(1,5);
		//获取已经报备好的二级商户
		List<RpUserSecondLevelMerchant> rpUserSecondLevelMerchantList = (List<RpUserSecondLevelMerchant>) rpUserSecondLevelMerchantDao.listPage(pageParam, paramMap).getRecordList();
		LOG.info("激活的二级商户数量:"+rpUserSecondLevelMerchantList.size());
		
		for(RpUserSecondLevelMerchant rpUserSecondLevelMerchant : rpUserSecondLevelMerchantList){
			
//			System.out.println("start:【分】:"+Calendar.getInstance().get(Calendar.MINUTE)+"|| 【秒】:"+Calendar.getInstance().get(Calendar.SECOND));
			//设置该商户的费率
			Map<String, Object> changeRateMap;
			try {
				changeRateMap = LongYangD0Util.changeRate(
						ConstantUtils.XY_CHANGEREATE, rpUserSecondLevelMerchant.getBusiContactMobile(), 
						ConstantUtils.PASS, ConstantUtils.ALI_RATE, 
						ConstantUtils.CBZID, ConstantUtils.CHANNEL_CODE_ALIPAY, rpUserSecondLevelMerchant.getBankMerchantSecret());
//				System.out.println("end:【分】:"+Calendar.getInstance().get(Calendar.MINUTE)+"|| 【秒】:"+Calendar.getInstance().get(Calendar.SECOND));
				
				
				String retCode4 = changeRateMap.get("retCode").toString();
				if("000000".equals(retCode4)){
					System.out.println("设置费率成功账户如下【"+rpUserSecondLevelMerchant.getBusiContactMobile()+"】");
					
					
					rpUserSecondLevelMerchant.setStatus(PublicStatusEnum.UNACTIVE.name());
					rpUserSecondLevelMerchantService.updateData(rpUserSecondLevelMerchant);
				}else{
					
					rpUserSecondLevelMerchant.setStatus("TOP_ERROR");
					System.out.println("设置费率失败账户如下【"+rpUserSecondLevelMerchant.getBusiContactMobile()+"】");
				}
			} catch (Exception e) {
				LOG.info("重置费率过程异常:"+e);
				System.out.println("设置异常失败账户如下【"+rpUserSecondLevelMerchant.getBusiContactMobile()+"】");
			}
			
		}
		System.out.println(message);
    }     
    
   
    
}
*/